<?php
	class rbacControl extends Control{
		function __auto(){
			if(!$this->rbac_is_login()){
				$this->go("base/login");
			}
			if(!$this->rbac_check_access()){
				if(APP=='admin' && CONTROL=='index' && METHOD=='index'){
					$this->go(__ROOT__);
				}else{
					$this->error("没有权限",__WEB__.'/admin/index/welcome');
				}
			}
		}
	}
?>